<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
    <title>管理员注册</title>
</head>
<body>
<%@include file="header.jsp" %>
<script>

    function register1(){
        var name=document.getElementById("UserName");
        var name1=document.getElementById("Name");
        var pas1=document.getElementById("PassWord");
        var pas2=document.getElementById("PassWordAgain");
        if(name.value==""){
            alert("账号为空！");
            return false;
        }
        if(name1.value==""){
            alert("姓名为空！");
            return false;
        }
        if(name.value.length!=8){
            alert("账号长度为8个字符！");
            return false;
        }
        if(pas1.value==""){
            alert("密码不能为空！");
            return false;
        }
        if(pas2.value==""){
            alert("密码确认不能为空！");
            return false;
        }
        if(pas1.value.length>8){
            alert("密码长度不能超过8个字符！");
            return false;
        }
        if(pas1.value!=pas2.value){
            alert("两次输入的密码不相同！");
            return false;}
        return true;
    }
</script>
管理员注册
<%=(request.getAttribute("msg")==null?"":"<div id=msg style="+"color:red;"+" >"+request.getAttribute("msg")+"</div>")%>
<form name=RegisterManageForm action="registerManage.jsp" method="post">
    <table border="0" width="100%">
        <tr>
            <td width="45%" align="right">管理员姓名</td>
            <td><input type=text name=Name id="Name"></td>
        </tr>
        <tr>
            <td width="45%" align="right">管理员账号</td>
            <td><input type=text name=UserName id="UserName"></td>
        </tr>
        <tr>
            <td align="right">登录密码</td>
            <td><input type=password name=PassWord id="PassWord"></td>
        </tr>
        <tr>
            <td align="right">密码确认</td>
            <td><input type=password name=PassWordAgain id="PassWordAgain"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" οnclick="return register();" value="注册" onclick="return register1()">
                <input type="reset" value="重置"><br>
                <a href="ManageForm.jsp">管理员登录</a>
            </td>
        </tr>
    </table>
</form>
<%@include file="footer.jsp" %>
</body>
</html>
